package com.px.controller;

import com.px.dao.UserDao;
import com.px.pojo.ShUser;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class ProviderMaiController {
    @Resource
    private UserDao userDao;

    /**
     * 添加邮箱
     * @param shUser
     * @return
     * @throws Exception
     */
    @PostMapping("/api/mai")
    public boolean mai(@RequestBody ShUser shUser)throws Exception{
        Integer insert = userDao.insert(shUser);
        if (insert > 0){
            return true;
        }
        return false;
    }
}
